<!DOCTYPE html>
<!-- saved from url=(0048)https://api.xiaohupay.com/api/0.1/gateway/create -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
        在线支付 - 支付宝 - 网上支付 安全快速！
    </title>
    <script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="js/qrcode.js" type="text/javascript"></script>
    <script src="js/layer.js" type="text/javascript"></script><link rel="stylesheet" href="js/layer.css" id="layuicss-layer">
    <script src="js/config.js" type="text/javascript"></script>
    <!--<link rel="stylesheet" type="text/css" href="/css/QRCode.css">-->
    <link charset="utf-8" rel="stylesheet" href="css/front-old.css" media="all">
    <style>
        .switch-tip-icon-img {
            position: absolute;
            left: 70px;
            top: 70px;
            z-index: 11;
        }
        #codeico{
            position:fixed;
            z-index:9999999;
            width:43px;
            height:43px;
            /*background:url('<?php echo URL_VIEW;?>static/css/alipay/images/T1Z5XfXdxmXXXXXXXX.png') no-repeat;*/
        }
        body{
            font-family:微软雅黑;
        }
    </style>



</head>

<body>
<div class="topbar">
    <div class="topbar-wrap fn-clear">
        <a href="https://help.alipay.com/lab/help_detail.htm?help_id=258086" class="topbar-link-last" target="_blank" seed="goToHelp">常见问题</a>
        <span class="topbar-link-first">你好，欢迎使用支付宝付款！</span>

    </div>
</div>
<div id="header">
    <div class="header-container fn-clear">
        <div class="header-title">
            <div class="alipay-logo">
            </div>
            <span class="logo-title">
            我的收银台
          </span>
        </div>
    </div>
</div>


<div id="container">
    <div id="content" class="fn-clear">
        <div id="J_order" class="order-area">
            <div id="order" class="order order-bow">
                <div class="orderDetail-base">
                    <div class="commodity-message-row">
                <span class="first long-content">
                  收款方：侯明华
                </span> 交易单号：R201905071149463670　 (该订单有效期为960秒，过期后请不要支付。)
                        <span class="second short-content">
                  &nbsp;
                </span>
                    </div>
                    <span class="payAmount-area" id="J_basePriceArea">
                        <strong class=" amount-font-22 ">110.81元</strong> <span style="text-decoration:line-through">111</span>元

        </span>

                </div>
            </div>
        </div>
        <!-- 操作区 -->
        <div class="cashier-center-container">
            <div data-module="excashier/login/2015.08.02/loginPwdMemberT" id="J_loginPwdMemberTModule" class="cashiser-switch-wrapper fn-clear">
                <!-- 扫码支付页面 -->
                <div class="cashier-center-view view-qrcode fn-left" id="J_view_qr" style="postion:relative;left:40px;">

                    <!-- 扫码区域 -->
                    <div data-role="qrPayArea" class="qrcode-integration qrcode-area" id="J_qrPayArea">
                        <div class="qrcode-header">
                            <div class="ft-center">
                                扫一扫付款（元）                  </div>
                            <div class="ft-center qrcode-header-money"><!--?php echo $amount;?--></div>
                        </div>
                        <div class="qrcode-img-wrapper" id="payok">

                            <div align="center">

                                <!-- <img class="switch-tip-icon-img" id="imagesok" src="css/alipay/T1Z5XfXdxmXXXXXXXX.png" alt="手机支付宝图标" width="42" height="42"> -->

                                <span id="qrcode_img" title="alipays://platformapi/startapp?appId=20000067&amp;url=http://api.xiaohupay.com/api/0.1/gateway/trawin/81ee07fd03c101847836bd2b82f98496">
                                		<!--<canvas width="168" height="168" style="display: none;">

                                	</canvas>-->
                                    <!--<img alt="Scan me!" src="" style="display: block;">-->
                                	</span>
                                </font>
                                <font id="queren"></font>
                            </div>
                            <div class="qrcode-img-explain fn-clear">
                                <img class="fn-left" src="image/T1bdtfXfdiXXXXXXXX.png" alt="扫一扫标识">
                                <div class="fn-left">
                                    该订单过期还剩<br><strong id="hour_show"><s id="h"></s>0时</strong><strong id="minute_show"><s></s>13分</strong><strong id="second_show"><s></s>25秒</strong></div>
                            </div>
                        </div>
                        <div id="qrPayScanSuccess" class="mi-notice mi-notice-success  qrcode-notice fn-hide" style="display: none;margin-top: 5px;">
                            <div class="mi-notice-cnt">
                                <div class="mi-notice-title qrcode-notice-title">
                                    <i class="iconfont qrcode-notice-iconfont" title="扫描成功"></i>
                                    <p class="mi-notice-explain-other qrcode-notice-explain ft-break">
                                        <span class="ft-orange fn-mr5" data-role="qrPayAccount"></span>已创建订单，请在手机支付宝上完成付款
                                    </p>
                                </div>
                            </div>
                        </div>
                        <br>
                        　　　　 　　<a href="https://mobile.alipay.com/index.htm" class="qrcode-downloadApp">首次使用请下载手机支付宝</a><br><br>
                    </div>

                    <div class="panel-footer">

                        <span id="Span1" class="warning" style="color:red;font-size:20px;font-weight:bold;text-align:center">慎重提醒：由于银行到账时间缓慢，回调上分会延迟2-3分钟，请先耐心等待。</span>
                    </div>

                    <!-- 指引区域 -->
                    <div class="qrguide-area">
                        <img src="image/T13CpgXf8mXXXXXXXX.png" class="qrguide-area-img active">              </div>
                </div>

            </div>



        </div>

    </div>
</div>

<div id="partner"><br><p>本站为第三方辅助软件服务商，与支付宝官方和淘宝网无任何关系<br>支付系统 不提供资金托管和结算，转账后将立即到达指定的账户。</p>
    <br><img alt="合作机构" src="image/2R3cKfrKqS.png"></div>

<script>
    window.onload = function (ev) {
        var orderId  = "81ee07fd03c101847836bd2b82f98496";
        var createTime = parseInt("1557200986648"/1000);
        var successUrl = "https://www.8254d.com/api/recharge/onlinePaySyncCallback/20190507114943567198";
        var errorUrl = "https://www.8254d.com/api/recharge/onlinePaySyncCallback/20190507114943567198";
        var validTime = parseInt("960");
        console.log(orderId);
        console.log("createTime:" + createTime);
        console.log(successUrl);
        console.log(errorUrl);
        console.log("validTime" + validTime);
        var path = Config.wintranPath + orderId;
        console.log("path" + path);
        path = encodeURI(path);
        path = "alipays://platformapi/startapp?appId=20000067&url=" + path;

        $('#qrcode_load').remove();
        //设置参数方式
        var qrcode = new QRCode('qrcode_img', {
            text: path,
            width: 168,
            height: 168,
            colorDark : '#000000',
            colorLight : '#ffffff',
            correctLevel : QRCode.CorrectLevel.H
        });


        var currentTime = parseInt(new Date().getTime()/1000);
        console.log("currentTIme" + currentTime)

        var intDiff = parseInt("959");//倒计时总秒数量
        console.log("intDiff" + intDiff)




        function timer(intDiff){
            window.setInterval(function(){
                var day=0,
                        hour=0,
                        minute=0,
                        second=0;//时间默认值
                if(intDiff > 0){
                    day = Math.floor(intDiff / (60 * 60 * 24));
                    hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                    minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                    second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
                }
                //if (minute == 00 && second == 00) document.getElementById('qrcode').innerHTML='<br/><br/><br/><br/><br/><br/><br/><h2>二维码超时 请重新发起交易</h2><br/>';
                if (minute <= 9) minute = '0' + minute;
                if (second <= 9) second = '0' + second;
                $('#day_show').html(day+"天");
                $('#hour_show').html('<s id="h"></s>'+hour+'时');
                $('#minute_show').html('<s></s>'+minute+'分');
                $('#second_show').html('<s></s>'+second+'秒');
                intDiff--;
                if (intDiff ==0){
                    window.clearInterval(orderlst);
                    layer.confirm("订单已超时", {
                        icon: 2,
                        title: '订单已经超时',
                        btn: ['确认'] //按钮
                    }, function(){
                        location.href=errorUrl;
                    });
                }
            }, 1000);
        }
        if (intDiff <=0){
            window.clearInterval(orderlst);
            layer.confirm("订单已超时", {
                icon: 2,
                title: '订单已经超时',
                btn: ['确认'] //按钮
            }, function(){
                location.href=errorUrl;
            });
        }else {
            $(function(){
                timer(intDiff);
            });
        }
        //订单监控  {订单监控}
        function order(){
            $.ajax({
                type:"post",
                dataType:"json",
                url:"/server/service/order/query",
                data:{"orderId":orderId},
                success:function(result){
                    var data = result.data;
                    var code = result.code;
                    console.log(data.status)
                    if (code == 200 && data.status === "4"){
                        window.clearInterval(orderlst);
                        layer.confirm(result.msg, {
                            icon: 1,
                            title: '支付成功',
                            btn: ['我知道了'] //按钮
                        }, function(){
                            location.href=successUrl;
                        });
                        setTimeout(function(){location.href=successUrl},5000);
                    }

                    //订单已经超时
                    if((result.code == '200' && data.status === "3") ){
                        window.clearInterval(orderlst);
                        layer.confirm(result.msg, {
                            icon: 2,
                            title: '订单已经超时',
                            btn: ['确认'] //按钮
                        }, function(){
                            location.href=errorUrl;
                        });
                    }

                },
                error:function(e){

                }
            })

        }
        //周期监听
        var orderlst = setInterval(order,1000);

    }

</script></body></html>